package com.mgface.framework.component;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

/**
 * 获取到系统环境变量和application配置文件中的变量
 * 
 * @author user
 *
 */
@Component
public class SystemEnvironmentComponent implements EnvironmentAware {
	private static final Logger log = LogManager.getLogger(SystemEnvironmentComponent.class);

	@Override
	public void setEnvironment(Environment environment) {
		log.info(environment.getProperty("spring.thymeleaf.mode"));
	}

}
